<?php
namespace app\web\controller;
use think\Controller;

class Base extends Controller{
	public function _initialize(){		
		// 判断是否登录，没有登录跳转登录页面
		if(!session('user_auth') || !session('user_auth_sign')){
			$this->redirect('index/login');
		}
		$dispatch = $this->request->dispatch();
		$activeRouter = $dispatch['module']['0'] . '/' . $dispatch['module'][1] . '/' . $dispatch['module'][2];
		//echo $activeRouter;
		//exit();
		//$auth = new \com\Auth();
		//if(!$auth->check($activeRouter, session('user_auth')['uid'])){
		//	return $this->error('没有权限','index/index');
		//}
	}



}